package com.dayu.structure.proxy;

/**
 * 静态代理：在编译的时候就已经实现了，编译完成后代理类是一个实际的class文件
 */
public class StaticProxy implements Customer{

    private Customer target;
    public StaticProxy(Customer target) {
        this.target = target;
    }

    @Override
    public void save() {
        System.out.println("start...");
        target.save();
        System.out.println("commit...");
    }

}
